package person.tanjinfu.autorepository.entity;

import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;


@ToString(callSuper = true)
@Setter
@Getter
@Builder
@Document(collection = "Products")
@NoArgsConstructor
@AllArgsConstructor()
@EqualsAndHashCode
public class Product {
    @Id
    private String id;

    private String name;

    private String categoryId;

    public Product name(String name) {
        this.name = name;
        return this;
    }

    public Product categoryId(String categoryId) {
        this.categoryId = categoryId;
        return this;
    }


}
